package org.lanqiao.dxzf.service.admin.impl;

import java.util.List;

import org.lanqiao.dxzf.entity.Admin;
import org.lanqiao.dxzf.mapper.admin.AdminMapper;
import org.lanqiao.dxzf.service.admin.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService{
	@Autowired
	AdminMapper adminMapper;

	public List<Admin> find(Admin admin){
		return adminMapper.find(admin);
	}
	
	public Admin login(Admin admin) {
		List<Admin> list = adminMapper.find(admin);
		if(list.size()!=0) return list.get(0);
		else return null;
	}

	public void update(Admin admin) {		
		adminMapper.update(admin);
	}

	public Admin selectAdminByAid(Integer aid) {
		// TODO Auto-generated method stub
		return adminMapper.selectAdminByAid(aid);
	}
}
